<section class="content">
	<div class="row">
		<div class="col-xs-12">
			<input type="hidden" name="currentImgs" id="currentImgs"
				value="${currentImgs}" />
			<div class="box box-solid">
				<div class="box-header with-border">
					<h3 class="box-title">现场图片</h3>
				</div>
				<!-- /.box-header -->
				<div class="box-body">
					<div id="carousel-example-generic" class="carousel slide"
						data-ride="carousel">
						<ol class="carousel-indicators">
							<li data-target="#carousel-example-generic" data-slide-to="0"
								class=""></li>
							<li data-target="#carousel-example-generic" data-slide-to="1"
								class=""></li>
							<li data-target="#carousel-example-generic" data-slide-to="2"
								class="active"></li>
						</ol>
						<div id="imgcontrl" class="carousel-inner">
							
						</div>
						<a class="left carousel-control" href="#carousel-example-generic"
							data-slide="prev"> <span class="fa fa-angle-left"></span>
						</a> <a class="right carousel-control"
							href="#carousel-example-generic" data-slide="next"> <span
							class="fa fa-angle-right"></span>
						</a>
					</div>
				</div>
				<!-- /.box-body -->
			</div>
		</div>
	</div>
</section>

<script>
	
	$(function() {
		var imags = $("#currentImgs").val();
		var sysFiles;
		if(imags){
			ajaxPost(basePath + "/dform/getImgs/" + imags, null, function (data) {
                if (data.success) {
                	sysFiles = data.data;
                } else {
                    modals.info("未找到现场图片");
                }
            });
		}
		if(sysFiles && sysFiles.length > 0){
			var html ='';
			for(var i=0;i<sysFiles.length;i++){
				if(i == 0){
					html += '<div class="item active">';
				}else{
					html += '<div class="item">';
				}
				html += '<img src="${basePath}'+sysFiles[i].filePath+'" style="margin:0 auto;">';
				html += '<div class="carousel-caption">';
				html += sysFiles[i].fileName;
                html += '</div></div>'
			}
			if(html){
				$("#imgcontrl").empty();
				$("#imgcontrl").append(html);
			}
		}
	})
	
	
</script>